{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e1468544-0aac-4dc0-a9f4-f1d1c1001cc8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "w = [2.13756953] b = [90.78228498]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "x = np.array([[100], [113], [90], [89], [60], [70], [50], [45], [55], [78]])\n",
    "y = np.array([[301], [324], [285], [296], [200], [260], [300], [120], [180], [245]])\n",
    "\n",
    "model = LinearRegression()\n",
    "\n",
    "model.fit(x, y)\n",
    "\n",
    "print(\"w =\", model.coef_[0], \"b =\", model.intercept_)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
